package net.shopxx.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;



/**
 * 实体类 - 物流单
 */

@Entity
public class DeliveryOrder extends BaseEntity{

	private static final long serialVersionUID = -1235468934544313431L;
	
	private Boolean isEnabled;// 账号是否启用

	private String branch_id;// 分公司ID
	
	private String delivery_id;// 物流单编号
	
    private Date distribTime;// 分配日期
	
	private Date compTime;// 完成日期
	
	private String distribManager;// 分配人员
	
	private String distribStaff;// 物流人员
	
	private Date sendTime;// 发货日期
	
	private String isState;// 状态
	
	private String isProStatus;// 商品生产是否已完成状态
	
	private Product product ; //产品
		  	 	
	private Order order ; //订单

	public Boolean getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(Boolean isEnabled) {
		this.isEnabled = isEnabled;
	}

	public String getBranch_id() {
		return branch_id;
	}

	public void setBranch_id(String branch_id) {
		this.branch_id = branch_id;
	}

	public String getDelivery_id() {
		return delivery_id;
	}

	public void setDelivery_id(String delivery_id) {
		this.delivery_id = delivery_id;
	}
	
	public Date getDistribTime() {
		return distribTime;
	}

	public void setDistribTime(Date distribTime) {
		this.distribTime = distribTime;
	}

	public Date getCompTime() {
		return compTime;
	}

	public void setCompTime(Date compTime) {
		this.compTime = compTime;
	}

	public String getDistribManager() {
		return distribManager;
	}

	public void setDistribManager(String distribManager) {
		this.distribManager = distribManager;
	}

	public String getDistribStaff() {
		return distribStaff;
	}

	public void setDistribStaff(String distribStaff) {
		this.distribStaff = distribStaff;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getIsState() {
		return isState;
	}

	public void setIsState(String isState) {
		this.isState = isState;
	}

	public String getIsProStatus() {
		return isProStatus;
	}

	public void setIsProStatus(String isProStatus) {
		this.isProStatus = isProStatus;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}
	
	@Transient
	public boolean isEnabled() {
		return this.isEnabled;
	}
	
}